<template>
  <div id="Top_id">
    <el-dropdown>
      <span type="primary">
          <i class="el-icon-user"></i>
        管理员<i class="el-icon-arrow-down el-icon--right"></i>
      </span>
      <el-dropdown-menu slot="dropdown">
        <el-dropdown-item>
            <i class="el-icon-collection-tag
"></i>
            个人中心
        </el-dropdown-item>
        <el-dropdown-item>
            <i class="el-icon-setting"></i>
            设置
        </el-dropdown-item>
        <el-dropdown-item>
        <i class="el-icon-switch-button" ></i>
            <span @click='logout'>退出</span>
        </el-dropdown-item>
      </el-dropdown-menu>
    </el-dropdown>
  </div>
</template>

<script>
export default {
  methods:{
    logout(){
      //删除登录信息
      localStorage.removeItem('logindata')
      //跳转
      this.$router.replace('/login')
    }
  }
};
</script>

<style>
</style>